Cavity-sinking or wire electric discharge machining is now already state-of-the-art with excellent surface quality of R.sub.a less than 0.1 .mu.m and a material effect on the surface with a depth of less than 1 .mu.m. Such machining requires generators that produce monopolar or bipolar pulses in the megahertz range with current intensities of a few amperes, in which the electrostatic forces F.sub.E and the erosion forces F.sub.P (plasma forces) during machining are of the same order of magnitude.
It is known that during electrical discharge machining the electrical resistance of the spark gap can be determined by means of a measurement current source during additionally generated periodic pauses between pulse groups and the servo drive, rinsing device and generator controlled with it (CH 650 433). This method has the task of determining the degree of contamination and discharge concentrations from the electrical resistance during cavity-sinking, and controlling the process with these values so that higher removal performance is achieved during unsupervised operation.